using System;
using RanchBuddy.Core.Domain;
using StructureMap;

namespace RanchBuddy.Core.DataAccess
{
    [PluginFamily("Default")]
    public interface IAccountRepository
    {
        IAccount GetAccountByEmail(string Email);
        IAccount GetAccountByUsername(string Username);

        /// <summary>
        /// Checks to see if this email is in use or not
        /// </summary>
        /// <param name="account"></param>
        /// <returns>true = exists, false = doesn't exist</returns>
        bool EmailExists(string email);

        /// <summary>
        /// Checks to see if this username is in use or not
        /// </summary>
        /// <param name="account"></param>
        /// <returns>true = exists, false = doesn't exist</returns>
        bool UsernameExists(string username);

        bool KeyExists(Guid VerificationKey);

        /// <summary>
        /// Saves an account
        /// </summary>
        /// <param name="account"></param>
        /// <returns>RepositoryStatus with the results of the operation</returns>
        IRepositoryStatus SaveAccount(IAccount account);

        /// <summary>
        /// Deletes an account
        /// </summary>
        /// <param name="account"></param>
        /// <returns>RepositoryStatus with the results of the operation</returns>
        IRepositoryStatus DeleteAccount(IAccount account);
    }
}